package com.boot.controller;

import com.boot.domain.CommonResult;
import com.boot.domain.Order;
import com.boot.service.impl.OrderServiceImpl;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Description:
 *
 * @Autor: Rolin
 * datetime: 05-09-19:40
 */
@RestController
public class OrderController {

    @Resource
    private OrderServiceImpl orderService ;

    @GetMapping("/order/create")
//    此处可以直接传输一个对象进来
    public CommonResult create(Order order){
        orderService.create(order);
        return new CommonResult(200,"创建对象成功!",order);
    }
}
